#!/usr/bin/env python
# coding: utf-8

# In[35]:


import numpy as np
np.random.seed(1) 
X = np.random.randint(1, 10, size=30) 


# In[36]:


X


# In[37]:


X = X.reshape(-1,3)


# In[38]:


X


# In[39]:


X[2]


# In[40]:


for i in range(0,3):
    if X[2,i] <= 3:
        X[2,i] = 0
    elif X[2,i] > 3 & X[2,i]<=6:
        X[2,i] = 1
    else:
        X[2,i] = 2


# In[41]:


X[2]


# In[43]:


X_train = X[:,0:2]


# In[44]:


X_train


# In[45]:


Y_train = X[:,2]


# In[46]:


Y_train


# In[ ]:




